package com.XinYun.Library.modules.commons;


import com.XinYun.Library.modules.commons.ReturnCodes.ReturnCodes;

/**
 * 接口规范
 * @param <T> 为data的数据类型
 */
public class BasicJson<T> {
    //错误码
    private String code;
    //错误信息
    private String msg;
    //具体数据
    private T data;

    public void setReturnCM(ReturnCodes rc){
        this.setMsg(rc.getMsg());
        this.setCode(rc.getCode());
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }


}
